www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminModel\D_delete_fu_model.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>





<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->



<!--#include file=../../inc/ND_class_function.asp-->

<!--#include file="modelsys_inc/D_model_class.asp"-->
<%
AJAXshowLoader()

%>

<%

if qx_if_max=0 then


response.redirect "../D_suodinguser.asp"
end if
%>


<%
Function DelTablezu(TableName)
err.clear 
On Error Resume Next
Conn.Execute("Drop Table "&TableName&"")
if err.number=0 then 
DelTablezu=1
response.write "<br>删除表 "&TableName&" 成功.."
response.Flush()
else
errrstrra=err.Description
err.clear 
DelTablezu=0
response.write "<br>删除表 "&TableName&" 失败(可能表不存在).."
response.Flush()

end if
End Function


set filea=new Cls_FSO


set rs1=server.CreateObject("adodb.recordset")
       
rs1.open "select * from ND_models_reg where id="&request("modelid"),conn,1,1

pthhaaa=rs1("model_folder_path_name")


fla1="../../Model/Models/"&pthhaaa&"/"&iconfigfile

if filea.ReportFileStatus(server.mappath(fla1))=1 then

		
		dddd1=loadfile(fla1)
		
		call get_info_array_from_model_file_content(dddd1)
		
	else
		
		
		call get_info_array_from_model_file_content(" ")
			
end if

if cstr(nd1_model_is_sys)="0" or cstr(nd1_model_is_sys)="" then





delmodid=request("modelid")
%>
<!--#include file="del_xml_biaos_inc.asp"-->

<%
'必须在#include file="del_xml_biaos_inc.asp"后面,因为#include file="del_xml_biaos_inc.asp"里有读rs
conn.execute("delete from ND_models_reg where id="&request("modelid"))
%>

<%

have_zzzi=1

do while have_zzzi=1
have_zzzi=0
set rs12=server.CreateObject("adodb.recordset")
       
rs12.open "select * from ND_models_reg where model_folder_path_name='"&pthhaaa&"' and is_copy='1'",conn,1,1
if not rs12.eof then 
have_zzzi=1


delmodid=rs12("id")
%>

<!--#include file="del_xml_biaos_inc.asp"-->

<%
'必须在#include file="del_xml_biaos_inc.asp"后面,因为#include file="del_xml_biaos_inc.asp"里有读rs
conn.execute("delete from ND_models_reg where id="&delmodid)

end if

rs12.close
set rs12=nothing
loop


'必须在#include file="del_xml_biaos_inc.asp"后面,因为#include file="del_xml_biaos_inc.asp"里有读xml
'不删目录,因为可能再安装
'filea.deleteAFolder(server.mappath("../../Model/Models/"&pthhaaa))

%>



<script language=javascript>

alert("删除模型及其所有实例成功");

self.location="D_admin_models.asp";


</script>
<%
else
%>
<script language=javascript>

alert("该模型为系统模型,无法删除,你可以先禁用它");

self.location="D_admin_models.asp";


</script>



<%
end if

%>
<%


AJAXcloseLoader()
%>